import socket

dest_ip = input('请输入IP:')
dest_port = int(input('请输入PORT:'))
content =input('请输入要发送的内容:')

def main():
    s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
    s.sendto(content.encode('utf-8'),(dest_ip,dest_port))
    s.close()

if __name__=='__main__':
    main()
